-
Notifications
You must be signed in to change notification settings - Fork 53
Fix AttributeError: run with Odoo 14/15 #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
waiting for camptocamp/pytest-odoo#85
florentx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid that tests will no longer be run, with such change.
Method was calling super().run(...).
If you replace by a stub method, there will be no run.
'hasattr(BaseCase, "run")' returns True even if 'run' is only inherited from a parent class, which causes 'del BaseCase.run' to raise an AttributeError. We now catch the exception instead of checking with hasattr, to ensure compatibility across Odoo versions where 'run' may or may not be defined directly on BaseCase.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #85 +/- ##
=========================================
Coverage ? 35.48%
=========================================
Files ? 1
Lines ? 124
Branches ? 0
=========================================
Hits ? 44
Misses ? 80
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
waiting for camptocamp/pytest-odoo#85
fix #84